import React from 'react';

class MIcon extends React.Component{
	constructor(props) {
		super(props);
		this.states = {
			defaultIcon:['iconfont']
		}
		this._initIcon();
	}
	_initIcon(){
		let iconChange = "";
		this.props.type?iconChange = "icon-"+this.props.type:"";
		this.states.defaultIcon.push(iconChange);
	}
	render(){
		return (
			<i className={this.states.defaultIcon.join(" ")}></i>
		)
	}
}
module.exports = MIcon;